package com.easylinkin.linkappapi.device.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用电记录
 * </p>
 *
 * @author Xiaoyang
 * @since 2022-08-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("app_electricy_records")
public class ElectricyRecords extends Model<ElectricyRecords> {

    private static final long serialVersionUID = 1L;

    /**
     * ID 主键
     */
    @TableId("id")
    private String id;

    /**
     * 设备编码
     */
    @TableField("device_code")
    private String deviceCode;

    /**
     * 租户ID
     */
    @TableField("tenant_id")
    private String tenantId;

    /**
     * 区域ID
     */
    @TableField("area_id")
    private Integer areaId;

    /**
     * 采集时间
     */
    @TableField("collect_time")
    private Date collectTime;

    /**
     * 用电增量
     */
    @TableField("electricy_increment")
    private Double electricyIncrement;

    /**
     * 累计用电量
     */
    @TableField("electricy_total")
    private Double electricyTotal;

    /**
     * 止码读数 / 组合有功总电能(大屏)
     */
    @TableField("stop_reading")
    private Double stopReading;

    /**
     * 创建人id
     */
    @TableField("creator_id_")
    private Long creatorId;

    /**
     * 创建日期
     */
    @TableField("create_time_")
    private Date createTime;

    /**
     * 修改人id
     */
    @TableField("modify_id_")
    private Long modifyId;

    /**
     * 修改时间
     */
    @TableField("modify_time_")
    private Date modifyTime;

    /**
     * 备注
     */
    @TableField("remark_")
    private String remark;


    /**
     * a相电流
     */
    @TableField("a_phase_current")
    private Double aPhaseCurrent;
    /**
     *b相电流
     */
    @TableField("b_phase_current")
    private Double bPhaseCurrent;
    /**
     * c相电流
     */
    @TableField("c_phase_current")
    private Double cPhaseCurrent;
    /**
     *a相电压
     */
    @TableField("a_phase_voltage")
    private Double aPhaseVoltage;
    /**
     * b相电压
     */
    @TableField("b_phase_voltage")
    private Double bPhaseVoltage;
    /**
     * c相电压
     */
    @TableField("c_phase_voltage")
    private Double cPhaseVoltage;
    /**
     * 有功总功率
     */
    @TableField("active_power")
    private Double activePower;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
